package com.sky.controller.user;

import com.sky.result.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

@RestController("UserShopController")
@RequestMapping("/user/shop")
@Api("营业管理接口")
public class UserShopController {

    private static final String key = "SHOP_STATUS";

    @Autowired
    private RedisTemplate redisTemplate;



    /**
     * 查询营业状态
     * @return
     */
    @GetMapping("/{status}")
    public Result getShopStatus(){
        Object status = redisTemplate.opsForValue().get(key);
        return Result.success(status);
    }


}
